home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4506 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.9 KB

  1. Path: news.spies.com!usenet
  2. From: Erik Max Francis <max@alcyone.com>
  3. Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
  4. Subject: Re: float != float and floats as return types
  5. Date: Tue, 30 Jan 1996 02:33:39 -0800
  6. Organization: &tSftDotIotE
  7. Message-ID: <310DF403.2EDA7BBD@alcyone.com>
  8. References: <4ej9lb$mpc@fu-berlin.de> <310D4D9C.7DAB2E1B@alcyone.com> <4eke8g$64m@colossus.holonet.net>
  9. NNTP-Posting-Host: newton.alcyone.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b6a (X11; I; Linux 1.2.8 i486)
  14.  
  15. Russell Blackadar wrote:
  16.  
  17. > What is surprising is that all the columns are not zero!  The original poster
  18. > was offering some speculations as to how that might have happened, but as you
  19. > say (and I think he'd agree) it doesn't wash.  I ran his posted code and
  20. > got all zeroes.  Either there's a *serious* problem with his compiler, or the
  21. > posted code is not the same as what he compiled.
  22.  
  23. Not at all.  Systematic errors are expected when using floating point
  24. computations.
  25.  
  26. Under gcc 2.6.3 for Linux, his program prints the following:
  27.  
  28. | 0       0       0
  29. | 0       3.21547e-11     3.21547e-11
  30. | 0       1.28619e-10     1.28619e-10
  31. | 0       -1.25443e-09    -1.25443e-09
  32. | 0       5.14475e-10     5.14475e-10
  33. | 0       7.14357e-10     7.14357e-10
  34. | 0       -5.01772e-09    -5.01772e-09
  35. | 0       -1.46904e-08    -1.46904e-08
  36. | 0       2.0579e-09      2.0579e-09
  37. | 0       -2.02694e-09    -2.02694e-09
  38.  
  39.  
  40. -- 
  41. Erik Max Francis, &tSftDotIotE. && max@alcyone.darkside.com || max@alcyone.com
  42. San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
  43. H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
  44. Omnia quia sunt, lumina sunt. && GIGO Omega Psi && http://www.alcyone.com/max/
  45. "Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_
  46.